-- $Id$
unitDef = {
  unitname               = [[cvn]],
  name                   = [[Carrier JRN 88]],
  description            = [[Aircraft Carrier ]],
  acceleration           = 0.001,
  activateWhenBuilt      = true,
  bmcode                 = [[1]],
  brakeRate              = 0.008,
  buildAngle             = 16384,
  buildCostEnergy        = 90000,
  buildCostMetal         = 90000,
  builder                = true,
  buildTime              = 90000,
  canAssist              = false,
  canGuard               = true,
  canMove                = true,
  canPatrol              = true,
  canReclaim             = false,
  canRepair              = false,
  canRestore             = false,
  canstop                = [[1]],
  category               = [[TARGET SHIP]],
  CollisionSphereScale   = 1,
  collisionVolumeOffsets = [[0 80 30]],
  collisionVolumeScales  = [[240 240 800]],
  collisionVolumeTest    = 1,
  collisionVolumeType    = [[box]],
  corpse                 = [[DEAD]],

  customParams           = {
    helptext       = [[The Super Carrier JRN 88 is the Japanese Empire's Flagship fo the South Eastern Imperial Fleet]],
     },

  defaultmissiontype     = [[Standby]],
  energyUse              = 0,
  explodeAs              = [[death]],  --change later
  floater                = true,
  footprintX             = 10,
  footprintZ             = 24,
  --iconType               = [[carrier]],   --make one later 
  idleAutoHeal           = 100, 
  idleTime               = 30,
  isAirBase              = true,
  maneuverleashlength    = [[640]],
  mass                   = 2000,  -- should be larger
  maxDamage              = 900000,
  maxVelocity            = 0.1, --- change later?
  minWaterDepth          = 15,
  movementClass          = [[BIGBOAT]],
  noAutoFire             = false,
  noChaseCategory     = [[AIR NOTARGET TARGET]],
  objectName             = [[CVN.s3o]],
  --radarDistance          = 1500,
  --seismicSignature       = 4,
    sfxtypes = {
		explosiongenerators = {
		[[custom:flashmuzzle1]],
		[[custom:missileshot]],
		},
	},
  scale = 2,  --- does it work?
  sightDistance          = 900,
  smoothAnim             = true,
  steeringmode           = [[1]],
  TEDClass               = [[SHIP]],
  turnRate               = 5,
  waterline              = 0,
  workerTime             = 80,

  weapons                = {

    {
      def                = [[car1]],
	  badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
    },
    {
      def                = [[car2]],
      badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
	  slaveTo            = 1,
    },
    {
      def                = [[car1]],
	  badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
    },
    {
      def                = [[car2]],
      badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
	  slaveTo            = 3,
    },
	    {
      def                = [[car1]],
	  badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
    },
    {
      def                = [[car2]],
      badTargetCategory  = [[NOTARGET]],
      onlyTargetCategory = [[TARGET]],
	  slaveTo            = 5,
    },
  },


  weaponDefs             = {
  
car1 = {
id                 = 1,
	avoidFriendly      = false,
    burst              = 6,
    burstrate          = .1,
    collideFriendly    = false,
    craterBoost        = 0,
    craterMult         = 0,
    duration           = .02,
    explosionGenerator = [[custom:none]],
    id                 = 1,
    impactonly         = 1,
    impulseBoost       = 0,
    impulseFactor      = 0,
    name               = [[Phalanx]],
    range              = 600,
    reloadtime         = 3,
    rgbColor           = [[0.8 0.6 0.2]],
    soundStart         = [[autocannon]],
    sprayAngle         = 800,
    thickness          = 0.5,
    tolerance          = 1000,
    turret             = true,
    weaponType         = [[LaserCannon]],
    weaponVelocity     = 1200,
	InterceptedByShieldType = 2,
    damage = {
      default            = 25,
    },
  },
    car2 = {
    name = [[Missile Launcher]], 
	id = 1,
	rendertype = 1,
	lineofsight = 1,
	turret = 1,
	ballistic = 0,
	smoketrail = 1,
	smokedelay = .1,
	model = [[srocket.s3o]],
	collideFriendly     =  false,
	accuracy = 900,
	range = 800, 
	wobble = 500,
	reloadtime = 1,
	areaofeffect = 90,
	weapontimer = 5,
	weaponvelocity = 850,
	startvelocity = 550,
	weaponacceleration = 320,
	turnrate = 8000, --counter wobble?
	metalpershot = 0,
    energypershot = 0,	
	soundstart = [[Rocket]],
	soundhit = [[medexplo]],
	soundTrigger = 1,
	firestarter = 70,
	guidance = 1,
	tracks = 1,
	selfprop = 1,
	tolerance = 1000,
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]],
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	startsmoke = 1,
	InterceptedByShieldType = 2,

    damage = {
      default            = 250,
    },
  },
  
--- end of weapons
  },


  featureDefs            = {

    DEAD  = {
      description      = [[Wreckage - Reef]],
      blocking         = false,
      category         = [[corpses]],
      damage           = 99000,
      energy           = 0,
    --  featureDead      = [[DEAD2]],
      footprintX       = 6,
      footprintZ       = 6,
      height           = [[4]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[CVN.s3o]],
      reclaimable      = true,
      reclaimTime      = 2400,
      seqnamereclamate = [[TREE1RECLAMATE]],
      world            = [[All Worlds]],
    },

  },

}

return lowerkeys({ cvn = unitDef })
